/* RAIErrorCard.css */

.rai-error-card {
    border: 2px solid #fca5a5;
    background: #fef2f2;
    border-radius: 12px;
    padding: 0;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    max-width: 600px;
}

.rai-error-header {
    background: #fee2e2;
    padding: 16px 20px;
    border-bottom: 1px solid #fca5a5;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rai-error-icon {
    color: #dc2626;
    font-size: 24px;
    flex-shrink: 0;
}

.rai-error-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rai-error-dismiss {
    color: #6b7280;
    padding: 4px;
    min-width: auto;
    height: auto;
}

.rai-error-dismiss:hover {
    color: #374151;
    background: rgba(107, 114, 128, 0.1);
}

.rai-error-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rai-error-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: rgba(248, 113, 113, 0.05);
    border-radius: 8px;
    border-left: 4px solid #f87171;
}

.rai-warning-icon {
    color: #f59e0b;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.rai-error-suggestions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rai-suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rai-suggestion-icon {
    color: #3b82f6;
    font-size: 16px;
    flex-shrink: 0;
}

.rai-suggestions-list {
    margin: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rai-suggestions-list li {
    list-style-type: none;
    position: relative;
    padding-left: 16px;
    line-height: 1.4;
}

.rai-suggestions-list li::before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.rai-error-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.rai-action-text {
    text-align: center;
    color: #1e40af;
}

.rai-retry-button {
    background: #3b82f6;
    border-color: #3b82f6;
    min-width: 120px;
}

.rai-retry-button:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Responsive design */
@media (max-width: 640px) {
    .rai-error-card {
        margin: 12px 0;
        border-radius: 8px;
    }
    
    .rai-error-header {
        padding: 12px 16px;
        border-radius: 6px 6px 0 0;
    }
    
    .rai-error-content {
        padding: 16px;
        gap: 12px;
    }
    
    .rai-error-description {
        padding: 8px;
    }
    
    .rai-suggestions-list {
        padding-left: 20px;
    }
    
    .rai-error-actions {
        padding: 12px;
        gap: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rai-error-card {
        background: #7f1d1d;
        border-color: #dc2626;
    }
    
    .rai-error-header {
        background: #991b1b;
        border-bottom-color: #dc2626;
    }
    
    .rai-error-description {
        background: rgba(220, 38, 38, 0.1);
        border-left-color: #dc2626;
    }
    
    .rai-error-actions {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.3);
    }
    
    .rai-action-text {
        color: #93c5fd;
    }
}
